<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>投票界面</title>
  <body>
    <center>
    <form action="update?id2=<s:property value="id"/>">
           <h2><s:property value="title"/></h2>
           <h3><s:property value="viewTimes"/>次查看，<s:property value="totalVotes"/>次投票。</h3>
          <s:iterator value="#get">
           <input type="radio" name="id2" value="<s:property value="id"/>"><s:property value="optContent"/> 票数:<s:property value="vote"/> 投票率:<s:property value="%{(vote*100/totalVotes)}"/>%<br/>
          </s:iterator>
          <input
           type="submit" value="投票">
           </form>
    </center>
  </body>
</html>